#pragma once
#include "stdafx.h"
#define DIST_CONST 50

class Api
{
public:
	static CGeoPolyline* GetPolyline(CdmEntityBase* entity);
	static int Offset(CdmEntityBase* entity,double off,CdmEntityBase*& entityout);
	static int Offset(CdmEntityBase* entity,double leftoff,double rightoff,CdmEntityBase*& entityleft,CdmEntityBase*& entityright);
	static double GetContourElevation(CdmEntityBase* pEntity);
	static BOOL CalculatePts(dmDPoint *& pNewPoints,int nCountPt,dmDPoint* pPoints,int side,double dig,double fill,double elevation);
	static BOOL LinearizePart(CGeoPolyline& geoSegment,const CGeoPolyline& geopolyline,double rStart,double rEnd);
	static BOOL CreatePoly(dmDbPolyline*& pNewPolyEntity,const CGeoPolyline & geoPolyline,int color);
	static bool IsDigital(const char* str);
	static int IsContourCurve(CdmEntityBase* pEntity);
	static void Join(CGeoPolyline & geoPolyline,const CGeoPolyline & geoNext);
	
};
